package summerbug.hanzi.api;

import retrofit2.Retrofit;
import retrofit2.adapter.rxjava.RxJavaCallAdapterFactory;
import retrofit2.converter.gson.GsonConverterFactory;
import rx.Observable;
import summerbug.hanzi.model.XinHuaZiDian;

/**
 * Created by 76336 on 2018/5/13.
 */

public class ApiManager {
    private static final Retrofit zdRetrofit = new Retrofit.Builder()
            .baseUrl("http://v.juhe.cn")
            .addConverterFactory(GsonConverterFactory.create())
            .addCallAdapterFactory(RxJavaCallAdapterFactory.create())
            .build();

    private static final ZiDianService zdManager = zdRetrofit.create(ZiDianService.class);

    public static Observable<XinHuaZiDian> getZiDianData(String key,String word){
        return zdManager.getZiDianData(key,word);
    }
}
